/*
 *    Copyright (c) 2018-2025, bfcloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: bfcloud
 */

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/jiangjin/jiangjinryllb/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/jiangjin/jiangjinryllb',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/jiangjin/jiangjinryllb/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/jiangjin/jiangjinryllb/' + id,
    method: 'delete'
  })
}

export function deleteBatch(query) {
  return request({
    url: '/jiangjin/jiangjinryllb/deleteBatch',
    method: 'get',
    params: query
  })
}

export function putObj(obj) {
  return request({
    url: '/jiangjin/jiangjinryllb',
    method: 'put',
    data: obj
  })
}


export function getListByRyCode(ryCode) {
  return request({
    url: '/jiangjin/jiangjinryllb/getListByRyCode/' + ryCode,
    method: 'get'
  })
}

export function saveBath(obj) {
  return request({
    url: '/jiangjin/jiangjinryllb/saveBath',
    method: 'post',
    data: obj
  })
}

//拆分时间
export function updateRyllbData(obj) {
  return request({
    url: '/jiangjin/jiangjinryllb/updateRyllbData',
    method: 'post',
    data: obj
  })
}
export function returnDouble(deptId,jb) {
  return request({
    url: '/jiangjin/jiangjinEjdwpz/returnDouble/' + deptId+'/'+jb,
    method: 'get'
  })
}

//附件管理
export function fjjl(id) {
  return request({
    url: '/jiangjin/jiangjinryllb/' + id,
    method: 'get'
  })
}

//附件管理
export function huoqu(obj) {
  return request({
    url: '/jiangjin/jiangjinryllb/',
    method: 'put',
    data:obj
  })
}

export function saveOrupdate(obj) {
  return request({
    url: '/jiangjin/jiangjinryllbpzxx/saveOrupdate',
    method: 'post',
    data: obj
  })
}

export function getDatas() {
  return request({
    url: '/jiangjin/jiangjinryllbpzxx/getDatas',
    method: 'get',
  })
}